#include <iostream>
#include <set>
#include <string>
using namespace std;

int main() {
long A, B, C, F, E, G1, G2, i;
bool hasDuplicates;
for (A = 1; A <= 3; A++) 
for (B = 0; B <= 9; B++)
for (C = 0; C <= 9; C++) {
F = A * 10000 + B * 1000 + C * 100 + A * 10 + B;
E = F * A;

hasDuplicates = false;
for (i = 1; i < 4; i++) { 
G2 = G1; 
G1 = E % 10; 
E /= 10; 
if (G1 == G2) {
hasDuplicates = true;
break;
}
}

if (!hasDuplicates) {
E = (A * 10000 + B * 1000 + C * 100 + A * 10 + B) * A;
cout << F << "*" << A << "=" << E << endl;
}

}

return 0;
}